<%@ page import="ro.gateway.aida.admin.PropertyListDB,
			  ro.gateway.aida.admin.PropertyListItem,
			  java.util.Iterator,
			  ro.xblue.translator.TranslatorUtils"%>
<%@ taglib uri="/WEB-INF/translator.tld" prefix="trans" %>
<%@ taglib uri="/WEB-INF/usr.tld" prefix="usr" %>
<%@ taglib uri="/WEB-INF/taglib.tld" prefix="lpd" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<trans:initPage module="proplists" />
<bean:define id="list" name="propslist_list" property="items" scope="session" type="java.util.ArrayList"/>
<bean:define id="proplist" name="propslist_list" scope="session" type="ro.gateway.aida.admin.PropertyList"/>
<%String ctx = request.getContextPath();%>
<%if (list == null) return;%>
<%
//	PropertyListItem x = PropertyListDB.getManager(application).getItemById(2);
//	System.out.println(x.getString("en"));
//	Iterator it = x.getStrings().keySet().iterator();
//	while (it.hasNext()) {
//		Object o =  it.next();
//		System.out.println("["+o + "]:"+x.getStrings().get(o));
//	}
//	System.out.println("["+TranslatorUtils.getCurrentLanguage(request, application).language+"]");
%>
<html>
<head>
	<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
	<META HTTP-EQUIV="EXPIRES" CONTENT="0">
	<title><trans:showPageMessage hide_link="true" label="page.title" /></title>
	<link rel="stylesheet" href="alf.css" type="text/css">
	<script language="javascript">
          function jumpto(url) {
              window.location = url;
          };
	</script>
</head>

<body>
<jsp:include page="../../header.jsp" />

<table align="center" width="500" border="0" cellpadding="5" cellspacing="1" background=<%=ctx%>/images/pixelbgtable.gif class="text_search">
	<tr>
		<td background=<%=ctx%>/images/pixelbgtable.gif class="textalb">
			<trans:showPageMessage label='<%=proplist.getList_title_tr_item()%>' />
		</td>
	</tr>
	<form action="<%=ctx%>/admin/editproplistitem.do">
	<input type="hidden" name="event" value=""/>
	<input type="hidden" name="list" value="<%=proplist.getList_name()%>"/>
	<tr><td colspan="2" bgcolor="#FFFFFF">
	<logic:iterate indexId="i" id="item" name="list" type="ro.gateway.aida.admin.PropertyListItem" >
		<div style="padding:5px;border:1px dashed black;margin:1px;">
		<% if (item.isConstant()) { %>
		<a href="<%=ctx%>/admin/editproplistitem.do?event=start&action=edit&id=<%=item.getId()%>">
     	<bean:write name="item" property="viewValue"/>
		</a>
		<% } else {%>
		<input type="checkbox" name="idxs" value='<%=i%>' />
		<a href="<%=ctx%>/admin/editproplistitem.do?event=start&action=edit&id=<%=item.getId()%>">
     	<bean:write name="item" property="viewValue"/>
		</a>
		<% } %>
		</div>
	</logic:iterate>
	</td></tr>
	<tr>
		<td bgcolor=ffffff>
		<% if (list.size() > 0) { %>
		<input type="button" name="x" value="<trans:showPageMessage label="delsel" hide_link="true" />" class="butonsave"
			onclick="javascript:this.form.event.value='delsel';this.form.submit();"/>
		<% } %>
		<input type="button" name="x" value="<trans:showPageMessage label="newit" hide_link="true" />" class="butonsave"
			onclick="javascript:jumpto('<%=ctx%>/admin/editproplistitem.do?event=start&action=create&list=<bean:write name="propslist_list" property="list_name" />');"/>
		</td>
	</tr>
	</form>
	</table>
	<trans:showPageMessage label="translator.showhiddentags"/>
	<jsp:include page="../../footer.jsp" />
</body>
 <HEAD>
 <META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
 </HEAD>